/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.uch.TablaSistema.managedBeans;

import org.richfaces.component.html.HtmlToolBar;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;
import java.util.Enumeration;
/**
 *
 * @author Vasquez
 */
public class mbMenu {
    
    private HtmlToolBar toolBar = new HtmlToolBar();
    private int rol_id;
    private String usu_usuario;
    
    /*public mbMenu(int rol_id, String usu_usuario) {
        this.rol_id = rol_id;
        this.usu_usuario = usu_usuario;
        this.armarMenu();
    }*/

    public HtmlToolBar getToolBar () {
        return toolBar;
    }

    public void setToolBar ( HtmlToolBar toolBar ) {
        this.toolBar = toolBar;
    }

    public int getRol_id () {
        return rol_id;
    }

    public void setRol_id ( int rol_id ) {
        this.rol_id = rol_id;
    }

    public String getUsu_usuario () {
        return usu_usuario;
    }

    public void setUsu_usuario ( String usu_usuario ) {
        this.usu_usuario = usu_usuario;
    }
    
    public String Usuarios(){
         return "MantenimientoUsuario";
     }
     
     public String Lector(){
         return "MantenimientoLector";
     }
     
     public String ImportarDoc(){
         return "ImportarDoc";
     }
     
     public String BusquedaReservaAdm(){
         return "BusquedaReservaAdm";
     }
     
     public String BusquedaReservaLec(){
         return "BusquedaReservaLec";
     }
     
     public String Prestamo(){
         return "Prestamo";
     }
     
     public String Devolucion(){
         return "DevolucionSancionxLector";
     }
     
     public String ReporteGeneral(){
         return "ReporteGeneral";
     }
     
     public String cerrar() {
        HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);

        Enumeration atributos = session.getAttributeNames();
        while (atributos.hasMoreElements()) {
            session.removeAttribute((String) atributos.nextElement());
        }
        session.invalidate();

        return "index";
    }
}
